﻿using ProTrack.Dto;
using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.Stock
{
    /// <summary>
    /// 仓库调拨业务逻辑层接口
    /// </summary>
    public interface IWareHouseAllocationServices
    {
        /// <summary>
        /// 获取所有仓库调拨信息
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<WareHouseAllocation>> GetAllAsync();
        /// <summary>
        /// 根据页码，页大小，仓库调拨编码，经办人，调出仓名称，订单状态获取仓库调拨信息
        /// </summary>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页大小</param>
        /// <param name="Number">仓库调拨编码</param>
        /// <param name="EmployeesName">经办人</param>
        /// <param name="ExWareHouseName">调出仓名称</param>
        /// <param name="Status">订单状态</param>
        /// <returns></returns>
        public Task<IEnumerable<WareHouseAllocation>> GetAsync(int PageIndex, int PageSize,string Number, string EmployeesName,string ExWareHouseName, int? Status);
        /// <summary>
        /// 根据仓库调拨编码，经办人，调出仓名称，订单状态获取总条数
        /// </summary>
        /// <param name="Number">仓库调拨编码</param>
        /// <param name="EmployeesName">经办人</param>
        /// <param name="ExWareHouseName">调出仓名称</param>
        /// <param name="Status">订单状态</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string Number, string EmployeesName, string ExWareHouseName, int? Status);
        /// <summary>
        /// 根据仓库调拨编号，库仓库编号获取仓库调拨明细表
        /// </summary>
        /// <param name="WareHouseAllocationId">仓库调拨编码</param>
        /// <param name="WareHouseId">仓库编号</param>
        /// <returns></returns>
        public Task<IEnumerable<WareHouseAllocationItemDto>> GetWareHouseAllocationIdAsync(string WareHouseAllocationId, string WareHouseId);
        /// <summary>
        /// 更新仓库调拨
        /// </summary>
        /// <param name="model">仓库调拨模型</param>
        /// <param name="list">仓库调拨 子项表模型</param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(WareHouseAllocation model, List<WareHouseAllocationItem> list);
        /// <summary>
        /// 新增仓库调拨
        /// </summary>
        /// <param name="model">仓库调拨模型</param>
        /// <param name="list">仓库调拨 子项表模型</param>
        /// <returns></returns>
        public Task<bool> AddAsync(WareHouseAllocation model, List<WareHouseAllocationItem> list);
        /// <summary>
        /// 根据编号批量删除仓库调拨信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int[] Ids);
        /// <summary>
        /// 根据编号删除指定仓库调拨信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int Id);
        /// <summary>
        /// 修改单据状态
        /// </summary>
        /// <param name="Id">单据Id</param>
        /// <param name="Status">状态：0待审核 1已审核</param>
        /// <returns></returns>
        public Task<bool> UpdateStatus(long Id, int Status);
    }
}
